package com.syedu.day08.homework;

import java.time.LocalDate;

/**
 * @Description 固定工资员工
 * @createTime 2022/3/17 17:02
 * @author Administrator
 */
public class SalariedEmployee extends Employee {

    //特有属性
    private double monthSalary;

    public SalariedEmployee() {

    }

    public SalariedEmployee(String name, LocalDate birthday, double monthSalary) {
        super(name, birthday);
        this.monthSalary = monthSalary;
    }

    public double getMonthSalary() {
        return monthSalary;
    }

    public void setMonthSalary(double monthSalary) {
        this.monthSalary = monthSalary;
    }

    @Override
    public double getSalary(int month) {
        /**super表示调用父类的方法*/
        return super.getSalary(month) + monthSalary;
    }
}
